package com.encon.projecttracker.server.data.pojo;

// default package
// Generated 04-May-2009 20:35:51 by Hibernate Tools 3.2.4.GA

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Companies generated by hbm2java
 */
@Entity
@Table(name = "companies", catalog = "test")
public class Companies implements java.io.Serializable {

	private Integer companyId;
	private User users;
	private int companyModule;
	private String companyName;
	private String companyPhone1;
	private String companyPhone2;
	private String companyFax;
	private String companyAddress1;
	private String companyAddress2;
	private String companyCity;
	private String companyState;
	private String companyZip;
	private String companyPrimaryUrl;
	private String companyDescription;
	private int companyType;
	private String companyEmail;
	private String companyCustom;
	private Set<Projects> projectses = new HashSet<Projects>(0);

	public Companies() {
	}

	public Companies(User users, int companyModule, int companyType) {
		this.users = users;
		this.companyModule = companyModule;
		this.companyType = companyType;
	}

	public Companies(User users, int companyModule, String companyName, String companyPhone1, String companyPhone2, String companyFax, String companyAddress1,
			String companyAddress2, String companyCity, String companyState, String companyZip, String companyPrimaryUrl, String companyDescription,
			int companyType, String companyEmail, String companyCustom, Set<Projects> projectses) {
		this.users = users;
		this.companyModule = companyModule;
		this.companyName = companyName;
		this.companyPhone1 = companyPhone1;
		this.companyPhone2 = companyPhone2;
		this.companyFax = companyFax;
		this.companyAddress1 = companyAddress1;
		this.companyAddress2 = companyAddress2;
		this.companyCity = companyCity;
		this.companyState = companyState;
		this.companyZip = companyZip;
		this.companyPrimaryUrl = companyPrimaryUrl;
		this.companyDescription = companyDescription;
		this.companyType = companyType;
		this.companyEmail = companyEmail;
		this.companyCustom = companyCustom;
		this.projectses = projectses;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "company_id", unique = true, nullable = false)
	public Integer getCompanyId() {
		return this.companyId;
	}

	public void setCompanyId(Integer companyId) {
		this.companyId = companyId;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "company_owner", nullable = false)
	public User getUsers() {
		return this.users;
	}

	public void setUsers(User users) {
		this.users = users;
	}

	@Column(name = "company_module", nullable = false)
	public int getCompanyModule() {
		return this.companyModule;
	}

	public void setCompanyModule(int companyModule) {
		this.companyModule = companyModule;
	}

	@Column(name = "company_name", length = 100)
	public String getCompanyName() {
		return this.companyName;
	}

	public void setCompanyName(String companyName) {
		this.companyName = companyName;
	}

	@Column(name = "company_phone1", length = 30)
	public String getCompanyPhone1() {
		return this.companyPhone1;
	}

	public void setCompanyPhone1(String companyPhone1) {
		this.companyPhone1 = companyPhone1;
	}

	@Column(name = "company_phone2", length = 30)
	public String getCompanyPhone2() {
		return this.companyPhone2;
	}

	public void setCompanyPhone2(String companyPhone2) {
		this.companyPhone2 = companyPhone2;
	}

	@Column(name = "company_fax", length = 30)
	public String getCompanyFax() {
		return this.companyFax;
	}

	public void setCompanyFax(String companyFax) {
		this.companyFax = companyFax;
	}

	@Column(name = "company_address1", length = 50)
	public String getCompanyAddress1() {
		return this.companyAddress1;
	}

	public void setCompanyAddress1(String companyAddress1) {
		this.companyAddress1 = companyAddress1;
	}

	@Column(name = "company_address2", length = 50)
	public String getCompanyAddress2() {
		return this.companyAddress2;
	}

	public void setCompanyAddress2(String companyAddress2) {
		this.companyAddress2 = companyAddress2;
	}

	@Column(name = "company_city", length = 30)
	public String getCompanyCity() {
		return this.companyCity;
	}

	public void setCompanyCity(String companyCity) {
		this.companyCity = companyCity;
	}

	@Column(name = "company_state", length = 30)
	public String getCompanyState() {
		return this.companyState;
	}

	public void setCompanyState(String companyState) {
		this.companyState = companyState;
	}

	@Column(name = "company_zip", length = 11)
	public String getCompanyZip() {
		return this.companyZip;
	}

	public void setCompanyZip(String companyZip) {
		this.companyZip = companyZip;
	}

	@Column(name = "company_primary_url")
	public String getCompanyPrimaryUrl() {
		return this.companyPrimaryUrl;
	}

	public void setCompanyPrimaryUrl(String companyPrimaryUrl) {
		this.companyPrimaryUrl = companyPrimaryUrl;
	}

	@Column(name = "company_description", length = 65535)
	public String getCompanyDescription() {
		return this.companyDescription;
	}

	public void setCompanyDescription(String companyDescription) {
		this.companyDescription = companyDescription;
	}

	@Column(name = "company_type", nullable = false)
	public int getCompanyType() {
		return this.companyType;
	}

	public void setCompanyType(int companyType) {
		this.companyType = companyType;
	}

	@Column(name = "company_email")
	public String getCompanyEmail() {
		return this.companyEmail;
	}

	public void setCompanyEmail(String companyEmail) {
		this.companyEmail = companyEmail;
	}

	@Column(name = "company_custom")
	public String getCompanyCustom() {
		return this.companyCustom;
	}

	public void setCompanyCustom(String companyCustom) {
		this.companyCustom = companyCustom;
	}

	@OneToMany(fetch = FetchType.EAGER, mappedBy = "companies")
	public Set<Projects> getProjectses() {
		return this.projectses;
	}

	public void setProjectses(Set<Projects> projectses) {
		this.projectses = projectses;
	}

}
